'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
    async up(queryInterface, Sequelize) {
        await queryInterface.createTable('Menus', {
            id: {
                type: Sequelize.INTEGER,
                allowNull: false,
                autoIncrement: true,
                primaryKey: true
            },
            menuType: {
                type: Sequelize.INTEGER,
                defaultValue: 0
            },
            higherMenuOptions: {
                type: Sequelize.STRING
            },
            parentId:Sequelize.STRING,
            title: {
                type: Sequelize.STRING
            },
            name: {
                type: Sequelize.STRING
            },
            path: {
                type: Sequelize.STRING
            },
            component: {
                type: Sequelize.STRING
            },
            rank: {
                type: Sequelize.INTEGER,
                defaultValue: 0
            },
            redirect: {
                type: Sequelize.STRING
            },
            icon: {
                type: Sequelize.STRING
            },
            extraIcon: {
                type: Sequelize.STRING
            },
            enterTransition: {
                type: Sequelize.STRING
            },
            leaveTransition: {
                type: Sequelize.STRING
            },
            activePath: {
                type: Sequelize.STRING
            },
            auths: {
                type: Sequelize.STRING
            },
            frameSrc: {
                type: Sequelize.STRING
            },
            frameLoading: {
                type: Sequelize.BOOLEAN,
                defaultValue: false
            },
            keepAlive: {
                type: Sequelize.BOOLEAN,
                defaultValue: false
            },
            hiddenTag: {
                type: Sequelize.BOOLEAN,
                defaultValue: false
            },
            fixedTag: {
                type: Sequelize.BOOLEAN,
                defaultValue: false
            },
            showLink: {
                type: Sequelize.BOOLEAN,
                defaultValue: false
            },
            showParent: {
                type: Sequelize.BOOLEAN,
                defaultValue: false
            },
            createdAt: {
                allowNull: false,
                type: Sequelize.DATE
            },
            updatedAt: {
                allowNull: false,
                type: Sequelize.DATE
            }
        });
    },
    async down(queryInterface, Sequelize) {
        await queryInterface.dropTable('Menus');
    }
};